package com.hqd.ch03.v49.context.annotation;

import com.hqd.ch03.v49.core.type.AnnotationMetadata;
import com.hqd.ch03.v49.core.type.MethodMetadata;
import com.hqd.ch03.v49.core.type.classreading.MetadataReader;
import com.hqd.ch03.v49.factory.annotation.AnnotatedBeanDefinition;
import com.hqd.ch03.v49.factory.support.GenericBeanDefinition;

public class ScannedGenericBeanDefinition extends GenericBeanDefinition implements AnnotatedBeanDefinition {

    /**
     * 注解信息
     */
    private final AnnotationMetadata metadata;

    public ScannedGenericBeanDefinition(MetadataReader metadataReader) {
        this.metadata = metadataReader.getAnnotationMetadata();
        setBeanClassName(this.metadata.getClassName());
        setResource(metadataReader.getResource());
    }


    @Override
    public final AnnotationMetadata getMetadata() {
        return this.metadata;
    }

    @Override
    public MethodMetadata getFactoryMethodMetadata() {
        return null;
    }

}

